public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
//        binaryTree.preOrder(root);
//        binaryTree.inOrder(root);
//        binaryTree.postOrder(root);
        System.out.println("节点的个数:");
        binaryTree.getNodeSize(root);
        System.out.println(binaryTree.nodeSize);

        System.out.println("叶子节点的个数:");
        binaryTree.getLeafNodeCount(root);
        System.out.println(binaryTree.LeafConut);

        System.out.println(binaryTree.getLeafNodeCount2(root));

        System.out.println("第K层节点的个数:");
        System.out.println(binaryTree.getKLevelNodeCount(root, 3));

        System.out.println("二叉树的高度:");
        System.out.println(binaryTree.getHigh(root));

        System.out.println("查找指定值");
        BinaryTree.TreeNode ret = binaryTree.find(root, 'C');
        System.out.println(ret.val);
        System.out.println(binaryTree.find(root, 'x'));

        System.out.println("层序遍历");
        binaryTree.levelOrder(root);
    }
}
